TypeError: Path must be a string. Received undefined